(define-macro/err (set-rest-flag/aux yexp)
  `(begin
     (push res-str str-l)
     (push res-str fn-l)
     (push (list res-str (string-length res-str) '() '词语 (cyl-serial)) cyl-l)))
(define-macro/err (set-cyl-list/ciyu-aux yexp)
  `(cond
    ((and (eq? st '词语)(string? res-str)(string=? res-str "、"))  ;;只允许使用形如[1]、[2]、[3]的形式调用无限参数函数，不允许形如[1]a、[2]a、[3]a的形式。
     (if (not rest-define/flag)
	 (begin
	   ;;需要在函数名确定时，确保、函数名片段连续使用。不允许使用[1]、[2]a[3]、[4]的形式。
	   (set! rest/flag #t)
	   (set! pure-flag/1class-flag #f)
	   (push res-str str-l)
	   (push res-str fn-l)
	   (push (list res-str (string-length res-str) '() '词语 (cyl-serial)) cyl-l))
	 (list 'err cyl-loc '无限参数函数名片段调用 '非法形式)))
    ((and (eq? st '词语)(string? res-str)(match-str res-str  0 "...")) ;;定义无限参数函数时，可以使用形如[a]、...和[a]b...和[a]b[c]...的形式。
     (if (and (not rest/flag)(not rest-define/flag)pure-yexp/1class-flag)
	 (begin
	   (set! rest-define/flag #t)
	   (push res-str str-l)
	   (push res-str fn-l)
	   (push (list res-str (string-length res-str) '() '词语 (cyl-serial)) cyl-l))
	 (list 'err cyl-loc '无限参数函数名片段定义 '非法形式)))
    ((eq? st '词语)
     ;;(y-or-n "OK111\n")
     (push res-str str-l)
     (push res-str fn-l)
     (push (list res-str (string-length res-str) '() '词语 (cyl-serial)) cyl-l))
    ((st-is st '常量)
     (push res-str str-l)
     (push res-str fn-l)
     (push (list res-str (string-length res-str) 0 st (cyl-serial)) cyl-l))
    (else
     (err-msg "警告[yexp][~a]：[~a]状态异常，[~a]按照词语处理。" loc st res-str)
     (push res-str str-l)
     (push res-str fn-l)
     (push (list res-str (string-length res-str) '() '词语 (cyl-serial)) cyl-l))))
(define-macro/err (set-cyl-list/sexp-guide-2 yexp)
  `(begin
     (cond
      ((rd-quote c)
       (push (list (string c) 1 s-exp-quote-coding 'lisp-quote (cyl-serial)) cyl-l)
       (push (string c) str-l))
      ((rd-unquote c)
       (push (list (string c) 1 s-exp-unquote-coding 'lisp-unquote (cyl-serial)) cyl-l)
       (push (string c) str-l))
      ((rd-backquote c)
       (push (list (string c) 1 (s-exp-backquote 'lisp-backquote (cyl-serial))) cyl-l)
       (push (string c) str-l))
      (else (exit-yexp (list 'err cyl-loc 1 '非法语法 (err-format 'yexp loc "[~a]不是lisp引导符号，只允许[, ' `]。")))))
     (set! loc (+ loc 1))
     (set! c (string-ref s loc))
     (cond
      ((rd-s-beg c)
       (let ((tmp-flag cyl-sexp-flag))
	 (let-set! (res-str loc sls srs res-cyl res-st) (run/err sexp s loc 1 0))
	 (set! cyl-sexp-flag tmp-flag))
       (push res-cyl cyl-l)
       (push res-str str-l)
       (exit-yexp (list (merge-str loc str-l) loc ls rs (merge-cyl loc cyl-l 'lisp-call) 'lisp-call)))
      ((rd-all-deli c)
       (exit-yexp (list 'err cyl-loc 1 '非法语法 (err-format 'yexp->set-cyl-list/sexp-guide loc "[' , `]后面不允许使用分隔符号[~a]。" c)))
       )
      (else
       (let-set! (res-str loc st coding)(run/err get-sym s loc))
       (set-sexp-cyl-list/lisp-guide)
       ))))
(define-macro/err (set-sexp-cyl-list/lisp-guide-1 yexp)
  `(let* ((cur-str res-str)
	  (cur-coding-l (find-current-coding-list cur-str))
	  (cur-coding (if cur-coding-l (nth 1 cur-coding-l) (if (eq? cyl-define-status 'func-define) (append-new-coding cur-str '局部变量 0)(append-new-coding cur-str '全局变量 0))))
	  (cur-type (if cur-coding-l (nth 0 cur-coding-l) (if (eq? cyl-define-status 'func-define) '局部变量 '全局变量)))
	  )
     (push (list cur-str (string-length cur-str) cur-coding cur-type (cyl-serial)) cyl-l)
     (push cur-str str-l)
     (exit-yexp (list (merge-str loc str-l) loc ls rs (merge-cyl loc cyl-l 'lisp-call) 'lisp-call))))
(define-macro/err (set-cyl-list/sexp-begin-1 yexp)
  `(begin
     ;;(y-or-n "yexp-sexp1:cyl-l=~a\n" cyl-l)
     (let ((tmp-flag cyl-sexp-flag))
       (let-set! (res-str loc sls srs res-cyl res-st)(run/err sexp s (+ loc 1) 1 0))
       (set! cyl-sexp-flag tmp-flag))
     (push res-cyl cyl-l)
     (push res-str str-l)
     ;;(y-or-n "yexp-sexp1:cyl-l=~a\n" cyl-l)
     (exit-yexp (list (merge-str loc str-l) loc ls rs (merge-cyl loc cyl-l 'lisp-call) 'lisp-call))))

(define-macro/err (set-dict-list/at yexp)
  `(if (not cyl-sexp-flag)
       (let ((res-atexp '()))
	 ;;(y-or-n "yexp->set-dict-list/at:loc=~a,fn-l=~a,par-l=~a,st=~a,dict=~a\n" loc fn-l par-l st cyl-current-symbol-dict-list) 
	 (let-set! (res-atexp loc res-st) (run/err handle-at s (+ loc 1) (merge-str loc fn-l) (length par-l)))
	 (if (eq? (nth 0 res-atexp) '函数定义@表达式)
	     (begin
	       (set! st 'y表达式函数名定义)
	       (set! cyl-at-define-list res-atexp)))
	 ;;(y-or-n "yexp-aux->set-dict-list/at:cyl-at-define-list=~a,loc=~a,dict=~a,st=~a\n" cyl-at-define-list loc cyl-current-symbol-dict-list st)
	 )
       (exit-yexp (list 'err cyl-loc '调用@表达式 '非法语法 (err-format 'yexp->set-dict-list/at loc "当前处于lisp解析中,不允许调用@表达式[~a][~a]." cyl-l cyl-sexp-flag)))
     ))
(define-macro/err (set-dict-list/and yexp)
 `(if (not cyl-sexp-flag)
       (let-set! (res-andexp loc res-st) (run/err handle-and s (+ loc 1) (merge-str loc fn-l) (length par-l)))
       (exit-yexp (list 'err cyl-loc '调用&表达式 '非法语法 (err-format 'yexp->set-dict-list/and loc "当前处于lisp解析中,不允许调用&表达式.")))
       ))

(define-macro/err (set-par-list/aux yexp)
  `(let ((tmp-st st)
	 (tmp-res-str res-str)
	 (tmp-ls ls)
	 (tmp-rs rs)
	 (tmp-res-cyl cyl-l)
	 (tmp-res-fn-str res-fn-str)
	 (tmp-res-par-num res-par-num)
	 (tmp-coding #f)
	 (tmp-type #f)
	 (tmp-cyl '())
	 (assign-cyl '())
	 (var-cyl '())
	 (cur-err-typ #f)
	 (cur-st #f)
	 (cur-coding #f)
	 )
     ;;(y-or-n "yexp-set-par-list:st=~a,cyl-l=~a\n" st cyl-l)
     (set! st '无参函数隐参调用)
     (set! cyl-loc loc)
     (set! res-cyl (pop cyl-l))
     ;;(y-or-n "yexp-set-par-list:cyl-l=~a,res-cyl=~a\n" cyl-l res-cyl)
     (if (eq? (nth 3 res-cyl) '词语)
	 (begin
	   (let-set! (tmp-coding tmp-type cur-st cur-err-typ) (run/err get-symbol-special-type-coding res-str eq? '无参函数 0))
	   ;;(y-or-n "yexp-set-par-list1:coding=~a\n" tmp-coding)
	   (if tmp-coding
	       (begin
		 (push (list res-str (string-length res-str) tmp-coding '无参函数调用 (cyl-serial)) cyl-l)
		 (push "(" str-l)
		 (push (list "(" 1 cyl-par-beg-coding '参数赋值开始 (cyl-serial)) assign-cyl)
		 ;;(y-or-n "yexp-set-par-list2:cyl=~a,loc=~a\n" assign-cyl loc)
		 (loop
		  ;;(y-or-n "yexp-set-par2000:OK")
		  (set! cyl-loc (+ loc 1))
		  ;;(y-or-n "yexp-set-par201:cyl-loc=~a\n" cyl-loc)
		  (let-set! (res-str loc cur-st cur-coding) (run/err get-sym s (+ loc 1)))
		  ;;(y-or-n "yexp-set-par20:res-str=~S loc=~a\n" res-str loc)
		  (if (and res-str (< (+ loc 1) len) (char=? (string-ref s (+ loc 1)) #\：))
		      (begin
			;;(set! res-str (substring s cyl-loc (+ loc 1)))
		
			;;(y-or-n "yexp-set-par-list21:res-str=~a\n" res-str)
			(set! cyl-loc loc)
			(let-set! (tmp-coding tmp-type cur-st cur-err-typ) (run/err get-symbol-special-type-coding res-str st-is '隐参变量 0))
			;;(y-or-n "yexp-set-par-list3:coding=~a\n" tmp-coding)
			(if tmp-coding
			    (begin
			      (push (list res-str (string-length res-str) tmp-coding tmp-type (cyl-serial)) var-cyl)
			      (push res-str str-l)
			      (push (list "：" 1 deli-std-coding '分隔符 (cyl-serial)) var-cyl)
			      (push "：" str-l)
			      (set! cyl-loc loc)
			      (let-set! (res-str loc ls rs res-cyl st res-fn-str res-par-num) (run/err yexp s (+ loc 2) 0 0))
			      (push res-str str-l)
			      (set! loc (+ loc 1))
			      (set! cyl-loc loc)
			      (push res-cyl var-cyl)
			      ;;(y-or-n "yexp-set-par31:var-cyl=~a,loc=~a\n" var-cyl loc)
			      (if (and (< loc len)(rd-s-end (string-ref s loc)))
				  (begin
				    (push (merge-cyl loc var-cyl '隐参赋值) assign-cyl)
				    
				    (push (list ")" 1 cyl-par-end-coding '参数赋值结束 (cyl-serial)) assign-cyl)
				    (push ")" str-l)
				    (push (merge-cyl loc assign-cyl '隐参赋值列表) cyl-l)
				    (set! cyl-l (merge-cyl loc cyl-l '无参函数隐参调用))
				    ;;(y-or-n "yexp-setpar-list4:str-l=~a,cyl-l=~a\n" str-l cyl-l)
				    (exit-yexp (list (run/err merge-str loc str-l) loc ls rs cyl-l '无参函数隐参调用)))
				  (if (< loc len)
				      (begin
					(let-set! (res-str loc st) (run/err get-deli s loc loc '开始))
					(set! cyl-loc loc)
					(if (and (string? res-str)(or (eq? st '分隔符)(eq? st '函数定义分隔符)))  ;;(or (string=? res-str "；")(string=? res-str " ")(string=? res-str "，")))
					    (begin
					      (push (list res-str (string-length res-str) deli-std-coding '分隔符) var-cyl)
					      (push res-str str-l)
					      (set! res-cyl (merge-cyl loc var-cyl '隐参赋值))
					      (push res-cyl assign-cyl)
					      ;;(set! loc (+ loc 1))
					      (set! cyl-loc loc)
					      (set! var-cyl '())
					      ;;(y-or-n "assign-cyl=~a,loc=~a\n" assign-cyl loc)
					      )
					    (exit-yexp (list 'err cyl-loc st '使用非法分隔符))
					    ))
				      (exit-yexp (list 'err cyl-loc st '未匹配到隐参结束符号))))
			      )
			    (exit-yexp (list 'err cyl-loc st '隐参有重名函数))))
		      (exit-yexp (list 'err cyl-loc st '隐参或分隔符不合法))
		 )))
	       (exit-yexp (list 'err cyl-loc st '无参函数有重名变量))
	       ))
	 (exit-yexp (list 'err cyl-loc st '不是无参函数))
	 )))
			
			    
			
			
     
     
       
       
      
     
    
	 
